import java.util.Scanner;

public class Test6_2 {
    public static void main(String[] args) throws Exception {
        OutExpection O = new OutExpection("请输入正确数字");
        int n,i;
        Scanner a = new Scanner(System.in);
        System.out.println("请输入数字");
        n = a.nextInt();
        if (n <= 0)
            throw O;
        else if(n > 0) {
            for(i=n-1;i>1;i--)
                if(n%i==0)
                    break;
                else if(n==i)
                    System.out.println(n + "是素数");
        }
    }
}


